<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Default Filesystem Disk
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default filesystem disk that should be used
    | by the framework. The "local" disk, as well as a variety of cloud
    | based disks are available to your application. Just store away!
    |
    */

    'default' => env('FILESYSTEM_DISK', 'local'),

    /*
    |--------------------------------------------------------------------------
    | Filesystem Disks
    |--------------------------------------------------------------------------
    |
    | Here you may configure as many filesystem "disks" as you wish, and you
    | may even configure multiple disks of the same driver. Defaults have
    | been set up for each driver as an example of the required values.
    |
    | Supported Drivers: "local", "ftp", "sftp", "s3"
    |
    */

    'disks' => [

        'local' => [
            'driver' => 'local',
            'root'   => storage_path('app'),
            'throw'  => false,
        ],

        'public' => [
            'driver'     => 'local',
            'root'       => storage_path('app/public'),
            'url'        => env('APP_URL') . '/storage',
            'visibility' => 'public',
            'throw'      => false,
        ],

        's3' => [
            'driver'                  => 's3',
            'key'                     => env('AWS_ACCESS_KEY_ID'),
            'secret'                  => env('AWS_SECRET_ACCESS_KEY'),
            'region'                  => env('AWS_DEFAULT_REGION'),
            'bucket'                  => env('AWS_BUCKET'),
            'url'                     => env('AWS_URL'),
            'endpoint'                => env('AWS_ENDPOINT'),
            'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
            'throw'                   => false,
        ],

        'backup' => [
            'driver'     => 'local',
            'root'       => storage_path('backup'),
            'url'        => env('APP_URL') . '/storage',
            'visibility' => 'public',
        ],

        'qiniu' => [
            'driver'                 => 'qiniu',
            'domain'    => '',  //你的七牛域名
            'domains'                => [
                'default' => '', //你的七牛域名
                'https'   => '',         //你的HTTPS域名
                'custom'  => '',                //Useless 没啥用，请直接使用上面的 default 项
            ],
            'access_key'             => '',  //AccessKey
            'secret_key'             => '',  //SecretKey
            'bucket'                 => '',  //Bucket名字
            'notify_url'             => '',  //持久化处理回调地址
            'access'                 => 'public',  //空间访问控制 public 或 private
            'hotlink_prevention_key' => '', // CDN 时间戳防盗链的 key。 设置为 null 则不启用本功能。
        ],

        'oss' => [
            'driver'            => "oss",
            'access_key_id'     => '',   // 必填, 阿里云的AccessKeyId
            'access_key_secret' => '',   // 必填, 阿里云的AccessKeySecret
            'bucket'            => '',   // 必填, 对象存储的Bucket, 示例: my-bucket
            'endpoint'          => '',   // 必填, 对象存储的Endpoint, 示例: oss-cn-shanghai.aliyuncs.com
            'internal'          => null, // 选填, 内网上传地址,填写即启用 示例: oss-cn-shanghai-internal.aliyuncs.com
            'domain'            => null, // 选填, 绑定域名,填写即启用 示例: oss.my-domain.com
            'is_cname'          => false,// 选填, 若Endpoint为自定义域名，此项要为true，见：https://github.com/aliyun/aliyun-oss-php-sdk/blob/572d0f8e099e8630ae7139ed3fdedb926c7a760f/src/OSS/OssClient.php#L113C1-L122C78
            'prefix'            => "",   // 选填, 统一存储地址前缀
            'use_ssl'           => false,// 选填, 是否使用HTTPS
            'reverse_proxy'     => false,// 选填, 域名是否使用NGINX代理绑定
            'throw'             => env('APP_DEBUG',false),// 选填, 是否抛出引起错误的异常,默认出现错误时,不抛出异常仅返回false
            'options'           => [],   // 选填, 添加全局配置参数, 示例: [\OSS\OssClient::OSS_CHECK_MD5 => false]
            'macros'            => []
        ],

    ],

    /*
    |--------------------------------------------------------------------------
    | Symbolic Links
    |--------------------------------------------------------------------------
    |
    | Here you may configure the symbolic links that will be created when the
    | `storage:link` Artisan command is executed. The array keys should be
    | the locations of the links and the values should be their targets.
    |
    */

    'links' => [
        public_path('storage') => storage_path('app/public'),
    ],

];
